#!/bin/bash#VariablesREAD1="../path-to_R1.fastq.gz"								#complete path to Read1				READ2="../path-to_R2.fastq.gz"								#complete path to Read2OUTDIR="../output/PlasmidControl"							#complete path to output directory, will be createdREF="../reference/Olig2_NR_Elements.fa"							#complete path to fasta file of all CRMs SAMPLE_NAME="Olig2_NR1"									#change CRM name CONTIG_RANGES="../reference/Trim-Olig2-CRMs.txt"					#complete path to txt file of CRMs indicating where to adapter trimDELETION_STATUS="True"PYTHON_SCRIPT="/path-to-scripts-folder/plasmid_scripts"					#complete path to plasmid_scripts folderDESIRED_CONTIG="Olig2_NR1"								#change CRM name#Specify paths to python scriptsPYTHON_LIBRARY_SCRIPT="$PYTHON_SCRIPT/dMPRA_Plasmid_Library_Analyze_LowMemory.py"MONTE_CARLO_SCRIPT="$PYTHON_SCRIPT/dMPRA_Plasmid_Library_MonteCarlo_LowMemory_V2.py"#Make Outdirmkdir $OUTDIRmkdir $OUTDIR/$SAMPLE_NAME#Load bbdukexport PATH="/Users/ajtulloch/MPRA/bbmap:$PATH" 					#complete path to local bbmap#Merge Reads 1 and 2bbmerge.sh in1=$READ1 in2=$READ2 out=$OUTDIR/$SAMPLE_NAME/Merged.fastq.gz#Alignminimap2 --cs -ax sr $REF $OUTDIR/$SAMPLE_NAME/Merged.fastq.gz | samtools view -bS - | samtools sort -o $OUTDIR/$SAMPLE_NAME/Aligned.bam#Indexsamtools index $OUTDIR/$SAMPLE_NAME/Aligned.bam#Run dMPRA Plasmid Library Analysis Python Scriptpython "$PYTHON_LIBRARY_SCRIPT" "$SAMPLE_NAME" "$OUTDIR" "$REF" "$CONTIG_RANGES" "$DELETION_STATUS" "No" "$DESIRED_CONTIG"#Run Monte Carlo Scriptpython "$MONTE_CARLO_SCRIPT" "$SAMPLE_NAME" "$OUTDIR" "$REF" "$CONTIG_RANGES" "$DESIRED_CONTIG" "$DELETION_STATUS" "$PYTHON_SCRIPT"